/*
 * Copyright:  2018 smarabbit studio.
 *
 *  Licensed under the Confluent Community License; you may not use this file
 *  except in compliance with the License.  You may obtain a copy of the License at
 *
 *  http://www.confluent.io/confluent-community-license
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 *  WARRANTIES OF ANY KIND, either express or implied.  See the License for the
 *  specific language governing permissions and limitations under the License.
 *
 *  @作   者： 黄开晖 (117227773@qq.com)
 *  @日   期:  2020年10月5日
 */
package com.massyframework.beanskin.maven.plugin.ras;

/**
 * 封装aes256加密算法的服务
 * 
 * @author huangkh
 *
 */
public interface AESService {

	/**
     * 加密
     * @param content {@link byte}数组，要加密的内容
     * @param key {@link String}, 密钥，长度只能是16字节
     * @return {@link byte}数组, 已加密的内容
     */
    byte[] encrypt(byte[] content, String key) throws Exception;

    /**
     * 解密
     * @param encryptedData {@link byte}数组，已加密的内容
     * @param key {@link String}, 密钥，长度只能是16字节
     * @return {@link byte}数组，原始数据
     * @throws Exception
     */
    byte[] decrypt(byte[] encryptedData, String key) throws Exception;
}
